﻿using System;
using System.Collections.Generic;

namespace FlurentFiltration
{
    internal class FilterBindingContainer
    {
        private readonly Dictionary<string, Type> _bindings;

        public FilterBindingContainer()
        {
            _bindings = new Dictionary<string, Type>();
        }

        public void Add(Type tCollection, Type tFilter)
        {
            _bindings.Add(tCollection.FullName, tFilter);
        }

        public void Remove(Type tCollection)
        {
            _bindings.Remove(tCollection.FullName);
        }

        public Type GetFilterType(Type tCollection)
        {
            return _bindings[tCollection.FullName];
        }

        public bool Contains(Type tCollection)
        {
            return _bindings.ContainsKey(tCollection.FullName);
        }
    }
}
